package weixinkeji.dev.dc.buy.order.event;

/**
 *
 * @author imyweb.org
 */
public class FWYEventSO {

    private static final StringBuilder sb = new StringBuilder();

    /**
     *
     * @param e new FWYEvent(order_code, room_code, opra)
     */
    synchronized public static void addEvent(FWYEvent e) {
        sb.append(",{\"event_time\":\"").append(e.event_time)
                .append("\",\"event_info\":\"").append(e.event_info).append("\"}");
    }

    public static String getEent() {
        return sb.length() == 0 ? "[]" : "[" + sb.substring(1) + "]";
    }
    
    public static void clearEvent() {
        sb.setLength(0);
    }
}
